﻿<div ng-controller="Gary.OnlineConsultingDashboardController as vm">
    <div class="filter-heading row">
        <form class="form-inline">
            <div class="span5">
                <div class="control-group row">
                    <label for="txtKeyword" class="span3 control-label">关键词</label>
                    <div class="span9">
                        <input type="text" class="form-control" ng-model="txtKeyword" id="txtKeyword" placeholder="关键词：">
                    </div>
                </div>
            </div>
            <div class="span5">
                <div class="control-group row">
                    <label for="selConsultType" class="span3 control-label">选择分类</label>
                    <div class="span9">
                        <select id="selConsultType">
                            <option ng-repeat="ct in vm.consultTypes" value="{{ct.nid}}">{{ct.name}}</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="span2">
                <button class="btn btn-primary" ng-click="doSearch();">搜索</button>
            </div>
        </form>
    </div>

    <div class="filter-body">
        <table class="table table-bordered">
            <thead>
                <tr>
                    <th>编号</th>
                    <th>标题</th>
                    <th>电邮</th>
                    <th>咨询分类</th>
                    <th>地址</th>
                    <th>状态</th>
                    <th>咨询时间</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="c in vm.consults">
                    <td>{{c.id}}</td>
                    <td>{{c.title}}</td>
                    <td>{{c.email}}</td>
                    <td>{{convertType(c.consultType)}}</td>
                    <td>{{c.ip}}</td>
                    <td>{{status(c.isSolve)}}</td>
                    <td>{{c.addtime}}</td>
                    <td>
                        <a href="javascript:;" ng-click="import({{c.id}});">导入</a>
                        <a href="javascript:;" ng-click="delete({{c.id}});">删除</a>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>

    <div class="filter-pager">
        <div class="pagination">
            <ul>
                <li><a href="#">Prev</a></li>
                <li><a href="#">1</a></li>
                <li><a href="#">2</a></li>
                <li><a href="#">3</a></li>
                <li><a href="#">4</a></li>
                <li><a href="#">5</a></li>
                <li><a href="#">Next</a></li>
            </ul>
        </div>
    </div>
</div>